package com.atguigu.gmall.all.controller;

import com.atguigu.gmall.order.client.OrderFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Map;

/**
 * @Author: 李旭
 * @Time: 14:39
 * @Description:
 */
@Controller
public class TradeController {

    @Autowired
    private OrderFeignClient orderFeignClient;
    //去结算
    @GetMapping("/trade.html")
    public String trade(Model model){
        Map<String, Object> trade = orderFeignClient.trade();
        //收货地址
        //商品清单
        //交易号
        //总件总金额
        model.addAllAttributes(trade);
        return "order/trade";
    }
}
